package com.briup.pts.exception;

import com.briup.pts.result.ResultCode;
import lombok.Getter;
import lombok.Setter;

/**
 * 自定义业务层异常
 */
@Getter
@Setter
public class ServiceException extends RuntimeException{
    private ResultCode resultCode;

    public ServiceException(ResultCode resultCode){
        super(resultCode.getCode() + "-" + resultCode.getMsg());
        this.resultCode = resultCode;
    }

    public ServiceException(String message) {
        super(message);
    }
}
